<extend name="Public:innerbase" />
<block name="js">
<include file="Public:upload" />
<script type="text/javascript" src="{:STATICS}/js/holder.min.js"></script>
</block>
<block name="content">
<div class="container">
	<div class="page-header">
		<h3>{$title}</h3>
		<a class="btn btn-sm btn-default" href="{:U('Flash/index')}">
			<span class="glyphicon glyphicon-chevron-left"></span>&nbsp;返回
		</a>
	</div>
	<form class="form-horizontal" role="form" method="post"
          action="<if condition="$info">{:U('Animation/upsave')}<else/>{:U('Animation/insert')}</if>">

    <div class="form-group">
        <label for="show" class="col-sm-2 control-label">是否显示动画</label>
        <div class="col-sm-6">
            <div class="input-group">
                <select  id="show" name="show">
                    <option value="1">显示</option>
                    <option value="0">不显示</option>
                </select>
                <script>
                    $("#show").val({$info.show});
                </script>
            </div>
        </div>
    </div>

    <div class="form-group">
        <label for="type" class="col-sm-2 control-label">外链地址</label>
        <div class="col-sm-6">
            <div class="input-group">
                <select  name="type">
                    <option value="1">上下翻动效果</option>
                </select>
            </div>
        </div>
    </div>

		<div class="form-group">
			<label for="img1" class="col-sm-2 control-label">图片1</label>
			<div class="col-sm-6" >
				<input type="hidden" class="form-control" value="{$info.img1}" id="img1" name="img1" />
				<img id="img1Holder" style="width:216px;height:120px;" class="img-rounded" <if condition="$info['img1'] eq ''">
                data-src="$holder.js/216x120/gray/text:720*400"</if> src="{$info.img1}"/>
				<div class="btn-group" style="vertical-align:bottom;">
					<span class="btn btn-xs btn-primary" onclick="selectAsset('img1',720,400)">
						<span class="glyphicon glyphicon-cloud-upload"></span>选择
					</span>
					<span class="btn btn-primary btn-xs" onclick="previewImg('img1')">
						<span class="glyphicon glyphicon-picture"></span>预览
					</span>
				</div>
			</div>
		</div>

    <div class="form-group">
        <label for="img2" class="col-sm-2 control-label">图片2</label>
        <div class="col-sm-6" >
            <input type="hidden" class="form-control" value="{$info.img2}" id="img2" name="img2" />
            <img id="img2Holder" style="width:216px;height:120px;" class="img-rounded" <if condition="$info['img2'] eq ''">
            data-src="$holder.js/216x120/gray/text:720*400"</if> src="{$info.img2}"/>
            <div class="btn-group" style="vertical-align:bottom;">
					<span class="btn btn-xs btn-primary" onclick="selectAsset('img2',720,400)">
						<span class="glyphicon glyphicon-cloud-upload"></span>选择
					</span>
					<span class="btn btn-primary btn-xs" onclick="previewImg('img2')">
						<span class="glyphicon glyphicon-picture"></span>预览
					</span>
            </div>
        </div>
    </div>

		<div class="form-group">
			<div class="col-md-4 col-sm-offset-2">
				<input type="submit" class="btn btn-primary" value="保存" />
			</div>
		</div>
	</form>
</div>
</block>